package com.fujitsu.cn.fnst.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.fujitsu.cn.fnst.base.BaseService;
import com.fujitsu.cn.fnst.dao.MeetingDao;
import com.fujitsu.cn.fnst.entiy.Meeting;

@Transactional
@Service
public class MeetingService implements BaseService<Meeting> {
    @Resource
    private MeetingDao meetingDao;

    @Override
    public Meeting find(int id) {
        return meetingDao.query(Meeting.class, id);
    }

    @Override
    public Meeting modify(Meeting t) {
        return meetingDao.update(t);
    }

    @Override
    public void delete(Meeting t) {
        meetingDao.delete(t);

    }

    @Override
    public Meeting add(Meeting t) {
        return meetingDao.insert(t);
    }

    @Override
    public List<Meeting> find(String queryString) {
        return meetingDao.query(queryString);
    }

    public List<Meeting> findByWhereAndOrder(String where, String order) {
        return meetingDao.findByWhereAndOrder(where, order);
    }

    public List<Meeting> findByUserRight(int right) {
        return meetingDao.findByUserRight(right);
    }

    public List<Meeting> findByFilter(String where) {
        return meetingDao.findByFilter(where);
    }

}
